package com.cy.cloud_project_server.entity;

import org.joda.time.DateTime;

/**
 * TODO(Descriptions)
 * @author changyuan
 * @date 2018年10月23日 上午10:11:44
 * @Copyright: 2018 www.birdsh.com Inc. All rights reserved.
 */
public class User {

    private int id;
    
    private String name;
    
    private String remark;
    
    private DateTime creatTime;
    
    private int createPersonId;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public DateTime getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(DateTime creatTime) {
        this.creatTime = creatTime;
    }

    public int getCreatePersonId() {
        return createPersonId;
    }

    public void setCreatePersonId(int createPersonId) {
        this.createPersonId = createPersonId;
    }

    @Override
    public String toString() {
        return "{\"id\":\"" + id + "\",\"name\":\"" + name + "\",\"remark\":\"" + remark + "\",\"creatTime\":\""
            + creatTime + "\",\"createPersonId\":\"" + createPersonId + "\"}";
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((creatTime == null) ? 0 : creatTime.hashCode());
        result = prime * result + createPersonId;
        result = prime * result + id;
        result = prime * result + ((name == null) ? 0 : name.hashCode());
        result = prime * result + ((remark == null) ? 0 : remark.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        User other = (User) obj;
        if (creatTime == null) {
            if (other.creatTime != null)
                return false;
        } else if (!creatTime.equals(other.creatTime))
            return false;
        if (createPersonId != other.createPersonId)
            return false;
        if (id != other.id)
            return false;
        if (name == null) {
            if (other.name != null)
                return false;
        } else if (!name.equals(other.name))
            return false;
        if (remark == null) {
            if (other.remark != null)
                return false;
        } else if (!remark.equals(other.remark))
            return false;
        return true;
    }
    
    
}
